package tt.dz.egobus.servicemanager.service;

/**
 * @author Anson
 * @date 17-8-9
 * @name
 * @since 1.0.6
 */
public interface GrabRedisBusinessWorkCacheService extends BusinessWorkCacheService {

    /**
     * @param driverId   司机抢单
     * @param businessId 当前业务id
     * @author Anson
     * @date 17-8-9
     * @name 司机抢单状态控制
     * @since 1.0.6
     */
    boolean doGrabBusiness(String driverId, String businessId);

    /**
     * @param driverId
     * @author Anson
     * @date 17-8-9
     * @name 当前司机抢单失败的时候
     * @since 1.0.6
     */
    boolean doGrabFail(String driverId);

    /**
     * @param driverId
     * @author Anson
     * @date 17-8-9
     * @name 司机放弃抢单
     * 司机当前状态必须是抢单状态,然后在能进行抢单放弃
     * @since 1.0.6
     */
    boolean giveUpGrab(String driverId);

    /**
     * @param driverId   司机抢单
     * @param businessId 当前业务id
     * @author Anson
     * @date 17-8-9
     * @name 确信当前司机的业务流水号一致
     * @since 1.0.6
     */
    boolean assertDriverBusinessId(String driverId, String businessId);


    /**
     * @param driverId       司机主键
     * @param bespeakDateStr 预约时间
     * @author Anson
     * @date 17-8-29
     * @name 是否含有当前预约日期
     * @since 1.0.7
     */
    boolean isContainBespeakDate(String driverId, String bespeakDateStr);

    /**
     * @param driverId       司机主键
     * @param bespeakDateStr 预约时间
     * @author Anson
     * @date 17-8-29
     * @name 司机添加预约日期
     * @since 1.0.7
     */
    boolean addBespeakDate(String driverId, String bespeakDateStr);

    /**
     * @param driverId       司机主键
     * @param bespeakDateStr 预约时间
     * @author Anson
     * @date 17-8-29
     * @name 司机删除预约日期
     * @since 1.0.7
     */
    boolean deleteBespeakDate(String driverId, String bespeakDateStr);

    /**
     * @param driverId          司机主键
     * @param bespeakOldDateStr 预约旧时间
     * @param bespeakNewDateStr 预约新时间
     * @author Anson
     * @date 17-8-29
     * @name 司机删除预约日期
     * @since 1.0.7
     */
    boolean updateBespeakDate(String driverId, String bespeakOldDateStr, String bespeakNewDateStr);


    /**
     * @param driverId
     * @author Anson
     * @date 17-8-30
     * @name 预约抢单成功
     * @since 1.0.7
     */
    boolean doBespeakGrabBusinessSuccess(String driverId);

    /**
     * @param driverId
     * @author Anson
     * @date 17-8-31
     * @name 司机取消行程
     * @since 1.0.7
     */
    boolean driverCancelBusiness(String driverId);

    /**
     *
     * @param driverId
     * @param businessId
     * @author Anson
     * @date 17-9-2
     * @name 司机开始接人的时候
     * @since 1.0.7
     *
     */
    boolean bespeakToBusiness(String driverId, String businessId);
}
